import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router';
import HomeView from '../views/HomeView.vue';
import PhotoView from '../views/PhotoView.vue';
import FriendCycle from '@/views/FriendCycleView.vue';
import Guestbook from '@/views/GuestbookView.vue';
import LoginView from '@/views/LoginView.vue';
import PersonalCenterView from '@/views/PersonalCenterView.vue';
import ArticleView from '@/views/ArticleView.vue';
import InformalEssayView from '@/views/InformalEssayView.vue';
import ArticleEditView from '@/views/ArticleEditView.vue';
import PhotoWallView from "../views/PhotoWallView.vue";
import MoreArticleView from "../views/MoreArticleView.vue";
import CreateCenterView from "@/views/CreateCenterView.vue";
import Dashboard from '@/views/Dashboard.vue';
import FriendLinkView from "@/views/FriendLinkView.vue";

const router = createRouter({
    history: createWebHashHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            redirect: '/home',
            hidden: true,
        },
        {
            path: '/home',
            name: 'home',
            component: HomeView,
         },
        {
            path: '/photo',
            name: 'photo',
            component: PhotoView,
        },
        {
            path: '/friendCycle',
            name: 'friendCycle',
            component: FriendCycle,
        },
        {
            path: '/guestbook',
            name: 'guestbook',
            component: Guestbook,
        },
        {
            path: '/login',
            name: 'login',
            component: LoginView,
        },
        {
            path: '/personalCenter',
            name: 'personalCenter',
            component: PersonalCenterView,
        }, 
        {
            path: '/article',
            name: 'article',
            component: ArticleView,
        },
        {
            path: '/moreArticle',
            name: 'moreArticle',
            component: MoreArticleView,
        },
        {
            path: '/informalEssay',
            name: 'informalEssay',
            component: InformalEssayView,
        },
        {
            path: '/article/edit',
            name: 'articleEdit',
            component: ArticleEditView,
        },
        {
            path: '/photoWall',
            name: 'photoWall',
            component: PhotoWallView,
        },
        {
            path: '/createCenter',
            name: 'createCenter',
            component: CreateCenterView,
        },
        {
            path: '/dashboard',
            name: 'dashboard',
            component: Dashboard,
        },
        {
            path: '/friendLink',
            name: 'friendLink',
            component: FriendLinkView,
        },
    ],
})

export default router